In the following you will map a device output to a global implicit variable, which you recently create for this purpose directly in the “I/O Mapping” dialog.
The “I/O Mapping” dialog is thus a further place for declaring a global variable.
Requirement: A device that supports an I/O mapping configuration in CODESYS is inserted in the device tree of your project. On the ⮫ I/O Mapping tab in the device editor you will thus see a tabular display of the input and output channels of the device with specification of the addresses and data types.
-
To open the device editor, double-click the device object in the device tree, and then the “<device name> I/O Mapping” tab.
-
Click in the mapping table on a channel entry in the “Variable” column in order to open an input field.
-
Specify a simple name (without "
.
") for a new variable (example:myBool
).